﻿using System;

namespace _002.交换两个变量
{
	internal class Program
	{
		static void Main(string[] args)
		{
			int a = 1;
			int b = 2;
            Console.WriteLine(a);
            Console.WriteLine(b);

            // 交换两个变量的值
            /*int temp = a;
			a = b;
			b = temp;*/
            a ^= b;
			b = a ^ b;
			a ^= b;
			Console.WriteLine(a);
			Console.WriteLine(b);
		}

	}
}
